if __name__ == '__main__':
    enums = ('abcd', 7865, 2.23, 'runoob')
    print(enums)

tuple_data = ('a', 'b', 'c')
dict_result = {i: val for i, val in enumerate(tuple_data)}
print(dict_result)  # 输出: {0: 'a', 1: 'b', 2: 'c'}

# 或者使用自定义键
keys = ('x', 'y', 'z')
dict_result = {k: [0] + [1] for k, v in zip(keys, tuple_data)}
print(dict_result)  # 输出: {'x': 'a', 'y': 'b', 'z': 'c'}
